#region (c) 2014 THN Solutions LLC. - All rights reserved
/*
Simplified BSD License (BSD)
Copyright (c) 2014, THN Solutions LLC. ( www.ThnSolutions.com )
Author: Nguyễn, M. Hải                 ( www.Minh-Hai.com     )
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice, this 
      list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above copyright notice, 
      this list of conditions and the following disclaimer in the documentation 
      and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
POSSIBILITY OF SUCH DAMAGE.
*/
#endregion

#region Record of Change
//             							CHANGE HISTORY
// -------------------------------------------------------------------------------------
// |   DATE    | DEVELOPER  | DESCRIPTION                                              |
// -------------------------------------------------------------------------------------
// | 12-Nov-09 | HaiNM      | First creation.                                          |
// -------------------------------------------------------------------------------------
//
#endregion

#region Record of Audit
//             							REVIEW HISTORY
// -------------------------------------------------------------------------------------
// |   DATE    | REVIEWER   | NOTES                                                    |
// -------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------
//
#endregion

#region Using directives
using System;
using System.Drawing;
using System.Windows.Forms;

using Thn;
#endregion

namespace Thn.Interface.Vcl
{
    /// <summary>
    /// A virtual control is defined as an abstract object that can paint and support input events.
    /// </summary>
#if DEBUG
    public
#else
    public
#endif
    interface IVirtualControl
    {
        #region Boundary

        #region Location
        /// <summary>
        /// Gets/Sets top-left coordinate.
        /// </summary>
        Point Location
        { get; set; }
        #endregion

        #region Size
        /// <summary>
        /// Gets/Sets dimensions.
        /// </summary>
        Size Size
        { get; set; }
        #endregion

        #region Set Bounds
        /// <summary>
        /// Set the boundary of this control.
        /// </summary>
        /// <param name="left">x-axis coordinate.</param>
        /// <param name="top">y-axis coordinate.</param>
        /// <param name="width">horizontal size.</param>
        /// <param name="height">vertical size.</param>
        void SetBounds(int left, int top, int width, int height);
        #endregion

        #endregion

        #region Render
        /// <summary>
        /// Paint this control.
        /// </summary>
        /// <param name="canvas">The graphics canvas to paint on.</param>
        /// <param name="context">The current renderation context.</param>
        void Render(Graphics canvas, RenderContext context);
        #endregion

        #region Focus

        #region Focused
        /// <summary>
        /// Checks whether this control is in focus.
        /// </summary>
        bool Focused
        { get; }
        #endregion

        #region Notify Got Focus
        /// <summary>
        /// This method is invoked to inform this control that it has received focus.
        /// </summary>
        void NotifyGotFocus();
        #endregion

        #region Notify Lost Focus
        /// <summary>
        /// This method is invoked to inform this control that it has lost focus.
        /// </summary>
        void NotifyLostFocus();
        #endregion
        #endregion

        #region Mouse Events

        #region Notify Mouse Enter
        /// <summary>
        /// This method is invoked to inform this control that it has received Mouse Enter event.
        /// </summary>
        void NotifyMouseEnter();
        #endregion

        #region Notify Mouse Leave
        /// <summary>
        /// This method is invoked to inform this control that it has received Mouse Leave event.
        /// </summary>
        void NotifyMouseLeave();
        #endregion

        #region Notify Mouse Move
        /// <summary>
        /// This method is invoked to inform this control that it has received Mouse Move event.
        /// </summary>
        void NotifyMouseMove(MouseEventArgs e);
        #endregion

        #region Notify Mouse Up
        /// <summary>
        /// This method is invoked to inform this control that it has received Mouse Up event.
        /// </summary>
        void NotifyMouseUp(MouseEventArgs e);
        #endregion

        #region Notify Mouse Down
        /// <summary>
        /// This method is invoked to inform this control that it has received Mouse Down event.
        /// </summary>
        void NotifyMouseDown(MouseEventArgs e);
        #endregion    

        #region Notify Mouse Click
        /// <summary>
        /// This method is invoked to inform this control that it has received Mouse Click event.
        /// </summary>
        void NotifyMouseClick(MouseEventArgs e);
        #endregion

        #region Notify Mouse Double Click
        /// <summary>
        /// This method is invoked to inform this control that it has received Mouse Double Click event.
        /// </summary>
        void NotifyMouseDoubleClick(MouseEventArgs e);
        #endregion

        #endregion

        #region Keyboard Events

        #region Notify Key Up
        /// <summary>
        /// This method is invoked to inform this control that it has received Key Up event.
        /// </summary>
        void NotifyKeyUp(KeyEventArgs e);
        #endregion

        #region Notify Key Down
        /// <summary>
        /// This method is invoked to inform this control that it has received Key Down event.
        /// </summary>
        void NotifyKeyDown(KeyPressEventArgs e);
        #endregion

        #region Notify Key Press
        /// <summary>
        /// This method is invoked to inform this control that it has received Key Press event.
        /// </summary>
        void NotifyKeyPress(KeyEventArgs e);
        #endregion

        #endregion
    }
}
